<template>
  <div>
    <app-header v-show="bNav"/>
    <!-- <AppHeader/> -->
    <router-view />
    <Footer v-show="bFoot"/>
  </div>
</template>

<script>
  import AppHeader from '../components/header.vue'
  import Footer from '../components/footer.vue'
  // import home from '../pages/home.vue'
  export default {
    name:'app',
    props:{},
    data(){
      return {
        bNav:true,
        bFoot:true
      }
    },
    components:{
      AppHeader,Footer
	// ,home
    },
    mounted(){},
    updated(){},
    methods:{},
    computed: {
    },
	watch:{
		$route(val){
		console.log('...',val.path);
		let path = val.path;
		let path2 = val.meta.path;
		if(/home|follow|column/.test(path)) {
		this.bNav=true;
		this.bFoot=true;
		}
	if(/login|reg/.test(path) || /detail/.test(path2)){
		this.bNav=false;
		this.bFoot=false;
	}
	if(path.includes('user')){
		this.bNav=false;
		this.bFoot=true;
			}
		}	
	}
  }
</script>

<style scoped>
  .app{}
</style>
